import request from "@/utils/request";

/**
 * @description 列表
 * @param params
 * @returns {*}
 */
export function list(params){
    return request({
        url:'/personnelInformation/list',
        method:'GET',
        params
    })
}
/**
 * @description 新增/编辑
 * @param data
 * @returns {*}
 */
export function save(data){
    return request({
        url:'/personnelInformation/update',
        method:'POST',
        data
    })
}

/**
 * @description 删除
 * @param id
 * @returns {*}
 */
export function deleteRow(id){
    return request({
        url:'/personnelInformation/delete',
        method:'GET',
        params:{id}
    })
}

/**
 * @description 详情
 * @param id
 * @returns {*}
 */
export function detail(id){
    return request({
        url:'/personnelInformation/detail',
        method:'GET',
        params:{id}
    })
}

/**
 * 文件导入
 * @param data
 */
export function doImport(data) {
    return request({
        url: '/api/importTemplateFile',
        method: 'POST',
        data
    })
}

export function downloadImport() {
    return request({
        url: '/api/downloadImportTemplateFile',
        method: 'GET',
        responseType: 'arraybuffer'
    })
}
